package com.java.oop;
class ClassA{
     int a1,a2;
     public ClassA(int a1){
         this.a1=a1;
     }
}
class ClassB extends ClassA{
    int a1;
    int b1;
    public ClassB(int a1){
        super(a1);
    }
}
public class OOPTests {
    public static void main(String[] args) {
          ClassA a1=new ClassA(5);
          ClassB b1=new ClassB(10);
          System.out.println(a1.a1);//5
          System.out.println(b1.a2);//0
          ClassA a2=new ClassB(20);
          //System.out.println(a2.b1);error
    }
}
